#pragma once

#include <vex/functional/result.h>
#include <vex/functional/contract/invoker_range.h>
#include <boost/concept_check.hpp>
#include <type_traits>

namespace vex { namespace functional { namespace concept {
    template<class TReducer, class TSignature> class Reducer
        : boost::CopyConstructible<typename std::decay<TReducer>::type>
    {
    public:
        typedef typename result<TSignature>::type sig_result_type;
        BOOST_CONCEPT_USAGE(Reducer)
        {
            m_instance(std::declval<contract::invoker_range<sig_result_type>*>());
        }
    private:
        typename std::decay<TReducer>::type m_instance;
    };

}}}